import React from "react";
import "antd/dist/antd.css";
import AddMeeting from "./AddMeeting";
import DelMeeting from "./DelMeeting";
// import DelAll from "./DelAll";
import SendNotice from "./SendNotice";
import ImportExportExcel from "./ImportExportExcel";
import EnableMeeting from "./EnableMeeting";

export default class Contorl extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      // uploadUrl: "",
      // downloadUrl: "",
    };
  }
  componentDidMount() {
    // /**获取文件导入导出地址 */
    // axios
    //   .post("getUploadDownloadUrlrst.rst")
    //   .then((res) => {
    //     let response = res.data;
    //     if (response.resultCode === 0) {
    //       this.setState({
    //         uploadUrl: response.result.uploadUrl,
    //         downloadUrl: response.result.downloadUrl,
    //       });
    //     } else {
    //       // alert('获取职工数据失败')
    //       message.error("文件地址请求失败");
    //     }
    //   })
    //   .catch((error) => {
    //     // alert('获取职工数据失败')
    //     message.error("文件地址请求失败");
    //   });
  }

  render() {
    const { changeDataSource, selectedRowKeys, getDataSource } = this.props;
    return (
      <>
        <ImportExportExcel
          // url为上传地址，importSuccessCallback为上传成功后的回调方法
          // templateHref={HOST + "/static/excel/excel_template.xlsx"}
          // url='/api/user_manage'
          getDataSource={getDataSource}
          // uploadUrl={uploadUrl}
          // downloadUrl={downloadUrl}
        />
        <AddMeeting
          changeDataSource={changeDataSource}
          getDataSource={getDataSource}
        />
        <EnableMeeting
          selectedRowKeys={selectedRowKeys}
          getDataSource={getDataSource}
        />
        <DelMeeting
          selectedRowKeys={selectedRowKeys}
          // delDataSource={this.props.delDataSource}
          getDataSource={getDataSource}
        />
        {/* <DelAll delDataSource={delDataSource} getDataSource={getDataSource} /> */}
        <SendNotice selectedRowKeys={selectedRowKeys} />
      </>
    );
  }
}
